import { Message } from 'element-ui'

// action处理模板
export function action (action, operate) {
    action
        .then(data => {
            if (operate) {
                operate(data)
            }
        })
        .catch(reason => Message.error(reason))
}
